﻿<phone:PhoneApplicationPage 
    x:Class="Coding4Fun.Toolkit.Test.WindowsPhone.Samples.Buttons.RoundButtons"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c4f="clr-namespace:Coding4Fun.Toolkit.Controls;assembly=Coding4Fun.Toolkit.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480">
	
	<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
			<TextBlock x:Name="ApplicationTitle" Text="{StaticResource AppName}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="round buttons" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
			<StackPanel>
				<TextBlock>basic content checks</TextBlock>
				<Grid Margin="0, 0, 0, -50">
					<StackPanel Orientation="Horizontal">
						<c4f:RoundButton 
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							/>
						<c4f:RoundButton
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Stretch="None"
							ImageSource="/Toolkit.Content/ApplicationBar.Cancel.png" 
							Label="img source" />
						<c4f:RoundButton 
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Foreground="Lime"
							Label="path simple">
							<Path 
								Height="30"
								Stretch="Uniform" 	
								Data="F1M428.6484,639.8711C428.6484,631.0761,424.7974,623.1801,418.6894,617.7731C418.5234,617.7281,418.3414,617.6941,418.1574,617.6861C417.9364,617.6771,417.6974,617.6991,417.4464,617.7481C417.4054,617.7561,417.3644,617.7651,417.3224,617.7741C417.2694,617.7861,417.2164,617.7981,417.1624,617.8121C414.8104,618.6141,410.4984,622.0021,406.3184,626.4521C406.3184,626.4521,411.7074,632.7011,416.3314,639.9001C417.5294,641.7671,418.5414,643.7461,419.5214,645.6581C422.0014,650.5031,423.5784,656.3371,421.6624,658.9321C426.0194,653.7891,428.6484,647.1371,428.6484,639.8711 M420.9204,659.2881C420.9174,659.1251,420.9044,658.9581,420.8844,658.7891C420.3994,654.6421,415.3734,648.8161,410.2704,643.2981C405.6554,638.3061,401.6274,635.1021,399.1804,633.0301L399.1804,633.0301C399.1654,633.0411,399.1504,633.0531,399.1364,633.0631C397.6924,634.1141,392.7904,638.2451,388.1624,643.2511C382.8864,648.9571,377.6924,655.0211,377.5154,659.1951C377.5154,659.2281,377.5164,659.2621,377.5174,659.2951C377.5194,659.4181,377.5274,659.5371,377.5404,659.6541C377.5444,659.6971,377.5494,659.7421,377.5554,659.7851C377.5634,659.8551,377.6374,659.9901,377.6674,660.0211C383.0754,665.7621,390.7244,669.3791,399.1194,669.3791C407.7474,669.3791,415.5104,665.6811,420.9104,659.7851C420.9134,659.7401,420.9154,659.6951,420.9174,659.6521C420.9224,659.5331,420.9234,659.4111,420.9204,659.2881 M382.5104,618.3821C381.9584,618.1061,381.4414,617.9041,380.9764,617.8001C380.9494,617.7941,380.9214,617.7871,380.8944,617.7811C380.6304,617.7281,380.3854,617.7071,380.1624,617.7241C379.9064,617.7431,379.6524,617.8051,379.4394,617.8721C373.3954,623.2751,369.5904,631.1291,369.5904,639.8711C369.5904,647.0741,372.2594,653.7281,376.6514,658.8871C374.8694,656.5651,376.1964,651.2821,378.8474,645.7731C379.7794,643.8361,380.9444,641.9261,382.1084,640.0371C386.5864,632.7711,392.1204,626.5891,392.1204,626.5891C388.2324,622.3051,384.4694,619.4551,382.5104,618.3821 M415.7474,615.4821C415.4074,615.2851,415.0034,615.1251,414.5234,615.0311C412.3844,614.6101,409.5054,615.3091,407.2734,616.2111C403.7734,617.6271,400.4634,619.5181,399.1734,620.3311L399.1734,620.3311C397.9404,619.5401,394.5434,617.5031,391.0034,616.1501C388.4144,615.1611,385.4154,614.6191,383.7994,614.9871C383.2114,615.1211,382.7434,615.3271,382.3684,615.5691C387.1274,612.2871,392.8984,610.3621,399.1194,610.3621C405.2864,610.3621,411.0114,612.2521,415.7474,615.4821" />
						</c4f:RoundButton>
						<c4f:RoundButton 
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Foreground="Red"
							Label="path clr set">
							<Path 
								Height="30"
								Fill="Lime"
								Stretch="Uniform" 	
								Data="F1M428.6484,639.8711C428.6484,631.0761,424.7974,623.1801,418.6894,617.7731C418.5234,617.7281,418.3414,617.6941,418.1574,617.6861C417.9364,617.6771,417.6974,617.6991,417.4464,617.7481C417.4054,617.7561,417.3644,617.7651,417.3224,617.7741C417.2694,617.7861,417.2164,617.7981,417.1624,617.8121C414.8104,618.6141,410.4984,622.0021,406.3184,626.4521C406.3184,626.4521,411.7074,632.7011,416.3314,639.9001C417.5294,641.7671,418.5414,643.7461,419.5214,645.6581C422.0014,650.5031,423.5784,656.3371,421.6624,658.9321C426.0194,653.7891,428.6484,647.1371,428.6484,639.8711 M420.9204,659.2881C420.9174,659.1251,420.9044,658.9581,420.8844,658.7891C420.3994,654.6421,415.3734,648.8161,410.2704,643.2981C405.6554,638.3061,401.6274,635.1021,399.1804,633.0301L399.1804,633.0301C399.1654,633.0411,399.1504,633.0531,399.1364,633.0631C397.6924,634.1141,392.7904,638.2451,388.1624,643.2511C382.8864,648.9571,377.6924,655.0211,377.5154,659.1951C377.5154,659.2281,377.5164,659.2621,377.5174,659.2951C377.5194,659.4181,377.5274,659.5371,377.5404,659.6541C377.5444,659.6971,377.5494,659.7421,377.5554,659.7851C377.5634,659.8551,377.6374,659.9901,377.6674,660.0211C383.0754,665.7621,390.7244,669.3791,399.1194,669.3791C407.7474,669.3791,415.5104,665.6811,420.9104,659.7851C420.9134,659.7401,420.9154,659.6951,420.9174,659.6521C420.9224,659.5331,420.9234,659.4111,420.9204,659.2881 M382.5104,618.3821C381.9584,618.1061,381.4414,617.9041,380.9764,617.8001C380.9494,617.7941,380.9214,617.7871,380.8944,617.7811C380.6304,617.7281,380.3854,617.7071,380.1624,617.7241C379.9064,617.7431,379.6524,617.8051,379.4394,617.8721C373.3954,623.2751,369.5904,631.1291,369.5904,639.8711C369.5904,647.0741,372.2594,653.7281,376.6514,658.8871C374.8694,656.5651,376.1964,651.2821,378.8474,645.7731C379.7794,643.8361,380.9444,641.9261,382.1084,640.0371C386.5864,632.7711,392.1204,626.5891,392.1204,626.5891C388.2324,622.3051,384.4694,619.4551,382.5104,618.3821 M415.7474,615.4821C415.4074,615.2851,415.0034,615.1251,414.5234,615.0311C412.3844,614.6101,409.5054,615.3091,407.2734,616.2111C403.7734,617.6271,400.4634,619.5181,399.1734,620.3311L399.1734,620.3311C397.9404,619.5401,394.5434,617.5031,391.0034,616.1501C388.4144,615.1611,385.4154,614.6191,383.7994,614.9871C383.2114,615.1211,382.7434,615.3271,382.3684,615.5691C387.1274,612.2871,392.8984,610.3621,399.1194,610.3621C405.2864,610.3621,411.0114,612.2521,415.7474,615.4821" />
						</c4f:RoundButton>
						<c4f:RoundButton
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Label="path complex"
							Foreground="CornflowerBlue">

							<Canvas Height="30">
								<!-- fill set manually -->
								<Path
									Height="21.177" Width="10.689"
									Canvas.Left="0" Canvas.Top="8.5"
									Stretch="Fill" 
									Data="F1M982.3193,243.5728C982.3193,242.2678,981.2623,241.2128,979.9583,241.2128L975.1003,241.2128C973.7973,241.2128,972.9483,242.1928,972.7413,243.5728C972.5323,244.9518,971.6303,251.2478,971.6303,251.2478C971.6303,251.7158,972.0083,252.0938,972.4753,252.0938C972.9433,252.0938,973.2293,251.7998,973.3213,251.2478C973.4153,250.6968,974.4323,244.1098,974.4323,244.1098L974.8443,244.1098L974.8443,261.2038C974.8443,261.8588,975.3763,262.3898,976.0303,262.3898C976.6843,262.3898,977.2153,261.8588,977.2153,261.2038L977.2153,251.2448L977.7333,251.2448L977.7333,261.2038C977.7333,261.8588,978.2643,262.3898,978.9193,262.3898C979.5733,262.3898,980.1043,261.8588,980.1043,261.2038L980.1043,244.1098L980.6273,244.1098L980.6273,250.5118C980.6273,250.9798,981.0053,251.3588,981.4733,251.3588C981.9403,251.3588,982.3193,250.9798,982.3193,250.5118z" />
								<Path 
									Height="4.075" Width="4.074"
									Canvas.Left="4" Canvas.Top="4" 
									Stretch="Fill" 
									Data="F1M969.0127,239.3003C969.0127,240.4253,968.1007,241.3373,966.9757,241.3373C965.8507,241.3373,964.9387,240.4253,964.9387,239.3003C964.9387,238.1753,965.8507,237.2623,966.9757,237.2623C968.1007,237.2623,969.0127,238.1753,969.0127,239.3003" />
								<!-- fill set by control -->
							
								<Path 
									Height="4.075" Width="4.074"
									Canvas.Left="-7.5" Canvas.Top="5" 
									Fill="Pink"
									Stretch="Fill" 
									Data="F1M979.7705,238.3481C979.7705,239.4731,978.8585,240.3851,977.7335,240.3851C976.6085,240.3851,975.6965,239.4731,975.6965,238.3481C975.6965,237.2231,976.6085,236.3101,977.7335,236.3101C978.8585,236.3101,979.7705,237.2231,979.7705,238.3481" />
								<Path 
									Height="20.216" Width="12.941"
									Canvas.Left="-12" Canvas.Top="9.5"
									Fill="Pink"
									Stretch="Fill" 
									Data="F1M966.9756,254.0859L966.9756,261.2579C966.9756,261.8819,967.4816,262.3899,968.1066,262.3899C968.7316,262.3899,969.2396,261.8819,969.2396,261.2579L969.2396,254.0859L971.7916,254.0619L969.2396,244.9399L969.7376,244.9399L971.6696,251.4919C971.7916,251.9059,972.2256,252.1419,972.6386,252.0209C973.0516,251.8989,973.2886,251.4649,973.1666,251.0509C973.1666,251.0509,971.7396,245.8369,971.3526,244.4269C970.9656,243.0159,970.3446,242.1739,969.0996,242.1739L964.3566,242.1739C963.1126,242.1739,962.4896,243.0159,962.1036,244.4269C961.7176,245.8369,960.2896,251.0509,960.2896,251.0509C960.1686,251.4649,960.4046,251.8989,960.8186,252.0209C961.2316,252.1419,961.6636,251.9059,961.7866,251.4919L963.7186,244.9399L964.2176,244.9399L961.6576,254.0859L964.2176,254.0859L964.2176,261.2579C964.2176,261.8819,964.7246,262.3899,965.3496,262.3899C965.9736,262.3899,966.4816,261.8819,966.4816,261.2579L966.4816,254.0859L966.9756,254.0859" />
							</Canvas>
						</c4f:RoundButton>
						<c4f:RoundButton
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Label="coding4fun"
							BorderBrush="Orange"
							Foreground="Orange"
							Background="WhiteSmoke">
							<TextBlock 
								FontSize="18">
								c4f
							</TextBlock>
						</c4f:RoundButton>
					</StackPanel>
					
					<StackPanel HorizontalAlignment="Right">
						<c4f:RoundButton 
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Orientation="Horizontal"
							Label="hor path" />
						<c4f:RoundButton 
							IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
							Orientation="Horizontal"
							ImageSource="/Toolkit.Content/ApplicationBar.Cancel.png" 
							Label="hor img" />
					</StackPanel>
				</Grid>
				<TextBlock>base functionality</TextBlock>
				<StackPanel Orientation="Horizontal">
					<c4f:RoundButton
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						Label="Click"
						Click="BasicClick" />
					<c4f:RoundButton 
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						Label="PressedBrush"
						PressedBrush="Lavender" />
					<c4f:RoundButton 
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						Stretch="None"
						ImageSource="{Binding TogglingImageSource}"
						Label="Img Flipping" 
						Click="TogglingImageSourceClick" />

					<c4f:RoundButton 
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						Stretch="None"
						Content="{Binding TogglingContent}"
						Label="Content Flipping" 
						Click="TogglingContentClick" />
				</StackPanel>
				<TextBlock>misc tests</TextBlock>
				<StackPanel Orientation="Horizontal">
					<c4f:RoundButton
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						ButtonWidth="50"
						ButtonHeight="50"
						Label="size path" />

					<c4f:RoundButton
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						ButtonWidth="50"
						ButtonHeight="50"
						Stretch="Uniform"
						ImageSource="/Toolkit.Content/ApplicationBar.Cancel.png" 
						Label="size img" />
					<c4f:RoundButton 
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						ButtonWidth="50"
						ButtonHeight="50"
						Padding="10"
						Label="pad" />
					<c4f:RoundButton 
						IsEnabled="{Binding IsChecked, ElementName=ToggleEnabled}"
						ButtonWidth="50"
						ButtonHeight="50"
						Margin="5" 
						Padding="0" 
						Label="no pad/ 5 marg" />
				</StackPanel>
				<toolkit:ToggleSwitch 
					Name="ToggleEnabled"
					IsChecked="true">
					is enabled
				</toolkit:ToggleSwitch>
			</StackPanel>
			<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
				<Button
					Content="basic" />
				<Button
		            BorderBrush="CornflowerBlue"
					Background="AliceBlue"
					Foreground="CornflowerBlue">
					clr
				</Button>
				<Button
					IsEnabled="False"
					Content="basic" />
				<Button
					IsEnabled="False"
					BorderBrush="CornflowerBlue"
					Background="AliceBlue"
					Foreground="CornflowerBlue">
					clr
				</Button>
				<Button 
					Content="bkgrd" 
					VerticalAlignment="Bottom"
					HorizontalAlignment="Right" 
					Click="ToggleBackgroundClick" />
			</StackPanel>
		</Grid>
    </Grid>
</phone:PhoneApplicationPage>
